.class public Lcom/brixd/niceapp/model/UserTrackModel;
.super Ljava/lang/Object;
.source "UserTrackModel.java"

# interfaces
.implements Ljava/io/Serializable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;
    }
.end annotation


# static fields
.field private static final serialVersionUID:J = 0x68bbe08886ad8b8eL


# instance fields
.field private downIdList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private favedIdList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private upIdList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 17
    return-void
.end method

.method private static parseAppTraceData(Lcom/brixd/niceapp/model/UserTrackModel;Lorg/json/JSONObject;Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;)V
    .registers 16
    .param p0, "userTrackModel"    # Lcom/brixd/niceapp/model/UserTrackModel;
    .param p1, "data"    # Lorg/json/JSONObject;
    .param p2, "type"    # Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;

    .prologue
    .line 80
    const-string v6, ""

    .line 81
    .local v6, "favKey":Ljava/lang/String;
    const-string v10, ""

    .line 82
    .local v10, "upKey":Ljava/lang/String;
    const-string v3, ""

    .line 84
    .local v3, "downKey":Ljava/lang/String;
    sget-object v11, Lcom/brixd/niceapp/model/UserTrackModel$1;->$SwitchMap$com$brixd$niceapp$model$UserTrackModel$UserTrackModelType:[I

    invoke-virtual {p2}, Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;->ordinal()I

    move-result v12

    aget v11, v11, v12

    packed-switch v11, :pswitch_data_84

    .line 107
    :goto_11
    invoke-virtual {p1, v6}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 108
    .local v4, "favHistory":Lorg/json/JSONArray;
    invoke-virtual {p1, v10}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 109
    .local v1, "appUpHistory":Lorg/json/JSONArray;
    invoke-virtual {p1, v3}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v0

    .line 111
    .local v0, "appDownHistory":Lorg/json/JSONArray;
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    .line 112
    .local v5, "favIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    new-instance v9, Ljava/util/ArrayList;

    invoke-direct {v9}, Ljava/util/ArrayList;-><init>()V

    .line 113
    .local v9, "upIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 115
    .local v2, "downIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    if-eqz v4, :cond_54

    .line 116
    const/4 v7, 0x0

    .local v7, "i":I
    :goto_2f
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-ge v7, v11, :cond_54

    .line 117
    invoke-virtual {v4, v7}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v8

    .line 118
    .local v8, "id":Ljava/lang/String;
    invoke-interface {v5, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 116
    add-int/lit8 v7, v7, 0x1

    goto :goto_2f

    .line 86
    .end local v0    # "appDownHistory":Lorg/json/JSONArray;
    .end local v1    # "appUpHistory":Lorg/json/JSONArray;
    .end local v2    # "downIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    .end local v4    # "favHistory":Lorg/json/JSONArray;
    .end local v5    # "favIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    .end local v7    # "i":I
    .end local v8    # "id":Ljava/lang/String;
    .end local v9    # "upIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    :pswitch_3f
    const-string v6, "app_fav_history"

    .line 87
    const-string v10, "app_up_history"

    .line 88
    const-string v3, "app_down_history"

    .line 89
    goto :goto_11

    .line 92
    :pswitch_46
    const-string v6, "nincegoods_fav_history"

    .line 93
    const-string v10, "nincegoods_up_history"

    .line 94
    const-string v3, "nincegoods_down_history"

    .line 95
    goto :goto_11

    .line 98
    :pswitch_4d
    const-string v6, "community_fav_history"

    .line 99
    const-string v10, "community_up_history"

    .line 100
    const-string v3, "community_down_history"

    .line 101
    goto :goto_11

    .line 122
    .restart local v0    # "appDownHistory":Lorg/json/JSONArray;
    .restart local v1    # "appUpHistory":Lorg/json/JSONArray;
    .restart local v2    # "downIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    .restart local v4    # "favHistory":Lorg/json/JSONArray;
    .restart local v5    # "favIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    .restart local v9    # "upIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    :cond_54
    if-eqz v1, :cond_67

    .line 123
    const/4 v7, 0x0

    .restart local v7    # "i":I
    :goto_57
    invoke-virtual {v1}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-ge v7, v11, :cond_67

    .line 124
    invoke-virtual {v1, v7}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v8

    .line 125
    .restart local v8    # "id":Ljava/lang/String;
    invoke-interface {v9, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 123
    add-int/lit8 v7, v7, 0x1

    goto :goto_57

    .line 129
    .end local v7    # "i":I
    .end local v8    # "id":Ljava/lang/String;
    :cond_67
    if-eqz v0, :cond_7a

    .line 130
    const/4 v7, 0x0

    .restart local v7    # "i":I
    :goto_6a
    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-ge v7, v11, :cond_7a

    .line 131
    invoke-virtual {v0, v7}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v8

    .line 132
    .restart local v8    # "id":Ljava/lang/String;
    invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 130
    add-int/lit8 v7, v7, 0x1

    goto :goto_6a

    .line 136
    .end local v7    # "i":I
    .end local v8    # "id":Ljava/lang/String;
    :cond_7a
    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/model/UserTrackModel;->setFavedIdList(Ljava/util/List;)V

    .line 137
    invoke-virtual {p0, v9}, Lcom/brixd/niceapp/model/UserTrackModel;->setUpIdList(Ljava/util/List;)V

    .line 138
    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/model/UserTrackModel;->setDownIdList(Ljava/util/List;)V

    .line 139
    return-void

    .line 84
    :pswitch_data_84
    .packed-switch 0x1
        :pswitch_3f
        :pswitch_46
        :pswitch_4d
    .end packed-switch
.end method

.method public static parseUserTrackModel(Lorg/json/JSONObject;Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;)Lcom/brixd/niceapp/model/UserTrackModel;
    .registers 3
    .param p0, "jsonObj"    # Lorg/json/JSONObject;
    .param p1, "type"    # Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;

    .prologue
    .line 69
    if-nez p0, :cond_4

    .line 70
    const/4 v0, 0x0

    .line 76
    :goto_3
    return-object v0

    .line 72
    :cond_4
    new-instance v0, Lcom/brixd/niceapp/model/UserTrackModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/model/UserTrackModel;-><init>()V

    .line 74
    .local v0, "userTrackModel":Lcom/brixd/niceapp/model/UserTrackModel;
    invoke-static {v0, p0, p1}, Lcom/brixd/niceapp/model/UserTrackModel;->parseAppTraceData(Lcom/brixd/niceapp/model/UserTrackModel;Lorg/json/JSONObject;Lcom/brixd/niceapp/model/UserTrackModel$UserTrackModelType;)V

    goto :goto_3
.end method


# virtual methods
.method public addDownId(I)V
    .registers 4
    .param p1, "id"    # I

    .prologue
    .line 35
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    if-eqz v0, :cond_d

    .line 36
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 39
    :cond_d
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    if-eqz v0, :cond_1a

    .line 40
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 42
    :cond_1a
    return-void
.end method

.method public addUpId(I)V
    .registers 4
    .param p1, "id"    # I

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    if-eqz v0, :cond_d

    .line 26
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 29
    :cond_d
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    if-eqz v0, :cond_1a

    .line 30
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 32
    :cond_1a
    return-void
.end method

.method public getDownIdList()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 61
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    return-object v0
.end method

.method public getFavedIdList()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 45
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->favedIdList:Ljava/util/List;

    return-object v0
.end method

.method public getUpIdList()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 53
    iget-object v0, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    return-object v0
.end method

.method public setDownIdList(Ljava/util/List;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 65
    .local p1, "downIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserTrackModel;->downIdList:Ljava/util/List;

    .line 66
    return-void
.end method

.method public setFavedIdList(Ljava/util/List;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 49
    .local p1, "favedIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserTrackModel;->favedIdList:Ljava/util/List;

    .line 50
    return-void
.end method

.method public setUpIdList(Ljava/util/List;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 57
    .local p1, "upIdList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/model/UserTrackModel;->upIdList:Ljava/util/List;

    .line 58
    return-void
.end method
